#include<stdio.h>
int main()
{
	double res,x,t=1.0,s=1.0,flag=1.0;
	int n,j; 
	scanf("%lf%d",&x,&n);
	for(j=1;j<=2*n-1;j++)
		{
		s*=j;
		t=t*x;
		if(j%2!=0)
		{
			res+=(flag)*t/s;
			flag=-flag;
		}
		}
	printf("%.8f",res);
	return 0;
}